package com.aj.activity.fragment;

import android.support.v4.app.Fragment;

import com.aj.activity.dialog.ProgressDialog;

public abstract class FamilyBaseFragment extends Fragment {
	protected ProgressDialog progressDialog;

	protected void showProgressDialog() {
		if (progressDialog == null) {
			progressDialog = new ProgressDialog(getActivity());
		}
		progressDialog.show();
	}

	protected void showProgressDialog(String text) {
		if (progressDialog == null) {
			progressDialog = new ProgressDialog(getActivity());
		}
		progressDialog.show();
		progressDialog.setContentText(text);
	}

	protected void showProgressDialog(int textID) {
		if (progressDialog == null) {
			progressDialog = new ProgressDialog(getActivity());
		}
		progressDialog.show();
		progressDialog.setContentText(textID);
	}

	protected void dimissProgressDialog() {
		if (progressDialog != null && progressDialog.isShowing()) {
			progressDialog.dismiss();
			progressDialog = null;
		}
	}
}
